<template>
  <div class="logo sc-display pbm0 pd020p">
    <img src="./default-logo.png" @click="fPageSwitch" :alt="props.msg" />
    <span class="fs24 fw500 white">&nbsp;Question bank</span>
  </div>
</template>

<script setup>
import { defineProps, reactive } from "vue";
import { useRouter } from "vue-router";

// 父组件传递数据
const props = defineProps({
  msg: String,
});

// 路由
const { push } = useRouter();

// 双向绑定数据
const state = reactive({
  current: "Logo组件",
});

// methods
const fPageSwitch = () => {
  push("/");
};
</script>

<style scoped>
.logo {
  width: 250px;
  height: 100%;
}
.logo img {
  width: 40px;
  height: 40px;
}
</style>
